package procilege.impl.formatter;

import procilege.compute.ExprFormatTraveller;
import procilege.compute.PlaceTypeMetadata;
import procilege.compute.PlaceType;
import procilege.lang.PredicateObjectProperty;

@PlaceTypeMetadata(type = PredicateObjectProperty.class)
public class PredicateObjectPropertyFormatter implements PlaceType<ExprFormatTraveller> {

	public void visit(ExprFormatTraveller tr, Object place) {

		StringBuilder sb = tr.getBuilder();
		PredicateObjectProperty n = (PredicateObjectProperty) place;
		
		tr.setout(n.getObject());
		sb.append('.');
		tr.setout(n.getProperty());
	}
}